<!-- INCLUDE overall_header.html -->

<a name="maincontent"></a>

<!-- IF S_EDIT -->

	<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>

	<h1>{L_TITLE}</h1>

	<p>{L_EXPLAIN}</p>

	<!-- IF ERROR_MSG -->
		<div class="errorbox">
			<h3>{L_WARNING}</h3>
			<p>{ERROR_MSG}</p>
		</div>
	<!-- ENDIF -->

	<form id="add_profile_field" method="post" action="{U_ACTION}">

	<!-- IF S_STEP_ONE -->

		<fieldset>
			<legend>{L_TITLE}</legend>
		<dl>
			<dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
			<dd><strong>{FIELD_TYPE}</strong></dd>
		</dl>
		<!-- IF S_EDIT_MODE -->
		<dl>
			<dt><label>{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
			<dd><input type="hidden" name="field_ident" value="{FIELD_IDENT}" /><strong>{FIELD_IDENT}</strong></dd>
		</dl>
		<!-- ELSE -->
		<dl>
			<dt><label for="field_ident">{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
			<dd><input class="text medium" type="text" id="field_ident" name="field_ident" value="{FIELD_IDENT}" /></dd>
		</dl>
		<!-- ENDIF -->
		<dl>
			<dt><label for="field_no_view">{L_DISPLAY_PROFILE_FIELD}:</label><br /><span>{L_DISPLAY_PROFILE_FIELD_EXPLAIN}</span></dt>
			<dd><label><input type="radio" class="radio" id="field_no_view" name="field_no_view" value="0"<!-- IF not S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
				<label><input type="radio" class="radio" name="field_no_view" value="1"<!-- IF S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
		</dl>
		</fieldset>

		<fieldset>
			<legend>{L_VISIBILITY_OPTION}</legend>
		<dl>
			<dt><label for="field_show_profile">{L_DISPLAY_AT_PROFILE}:</label><br /><span>{L_DISPLAY_AT_PROFILE_EXPLAIN}</span></dt>
			<dd><input type="checkbox" class="radio" id="field_show_profile" name="field_show_profile" value="1"<!-- IF S_SHOW_PROFILE --> checked="checked"<!-- ENDIF --> /></dd>
		</dl>
		<dl>
			<dt><label for="field_show_on_reg">{L_DISPLAY_AT_REGISTER}:</label><br /><span>{L_DISPLAY_AT_REGISTER_EXPLAIN}</span></dt>
			<dd><input type="checkbox" class="radio" id="field_show_on_reg" name="field_show_on_reg" value="1"<!-- IF S_SHOW_ON_REG --> checked="checked"<!-- ENDIF --> /></dd>
		</dl>
		<dl>
			<dt><label for="field_show_on_vt">{L_DISPLAY_ON_VT}:</label><br /><span>{L_DISPLAY_ON_VT_EXPLAIN}</span></dt>
			<dd><input type="checkbox" class="radio" id="field_show_on_vt" name="field_show_on_vt" value="1"<!-- IF S_SHOW_ON_VT --> checked="checked"<!-- ENDIF --> /></dd>
		</dl>
		<dl>
			<dt><label for="field_required">{L_REQUIRED_FIELD}:</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
			<dd><input type="checkbox" class="radio" id="field_required" name="field_required" value="1"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
		</dl>
		<dl>
			<dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}:</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
			<dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
		</dl>
		</fieldset>

		<!-- IF S_EDIT_MODE -->
			<fieldset class="quick">
				<input class="button1" type="submit" name="save" value="{L_SAVE}" />
			</fieldset>
		<!-- ENDIF -->

		<fieldset>
			<legend>{L_LANG_SPECIFIC}</legend>
		<dl>
			<dt><label for="lang_name">{L_USER_FIELD_NAME}:</label></dt>
			<dd><input class="text medium" type="text" id="lang_name" name="lang_name" value="{LANG_NAME}" /></dd>
		</dl>
		<dl>
			<dt><label for="lang_explain">{L_FIELD_DESCRIPTION}:</label><br /><span>{L_FIELD_DESCRIPTION_EXPLAIN}</span></dt>
			<dd><textarea id="lang_explain" name="lang_explain" rows="3" cols="80">{LANG_EXPLAIN}</textarea></dd>
		</dl>
		<!-- IF S_TEXT or S_STRING -->
			<dl>
				<dt><label for="lang_default_value">{L_DEFAULT_VALUE}:</label><br /><span>{L_DEFAULT_VALUE_EXPLAIN}</span></dt>
				<dd><!-- IF S_STRING --><input class="text medium" type="text" id="lang_default_value" name="lang_default_value" value="{LANG_DEFAULT_VALUE}" /><!-- ELSE --><textarea id="lang_default_value" name="lang_default_value" rows="5" cols="80">{LANG_DEFAULT_VALUE}</textarea><!-- ENDIF --></dd>
			</dl>
		<!-- ENDIF -->
		<!-- IF S_BOOL or S_DROPDOWN -->
			<dl>
				<dt><label for="lang_options">{L_ENTRIES}:</label>
					<!-- IF S_EDIT_MODE and S_DROPDOWN -->
						<br /><span>{L_EDIT_DROPDOWN_LANG_EXPLAIN}</span>
					<!-- ELSE -->
						<br /><span>{L_LANG_OPTIONS_EXPLAIN}</span>
					<!-- ENDIF -->
				</dt>
			<!-- IF S_DROPDOWN -->
				<dd><textarea id="lang_options" name="lang_options" rows="5" cols="80">{LANG_OPTIONS}</textarea></dd>
			<!-- ELSE -->
				<dd><input class="medium" id="lang_options" name="lang_options[0]" value="{FIRST_LANG_OPTION}" /> {L_FIRST_OPTION}</dd>
				<dd><input class="medium" name="lang_options[1]" value="{SECOND_LANG_OPTION}" /> {L_SECOND_OPTION}</dd>
			<!-- ENDIF -->
			</dl>
		<!-- ENDIF -->
		</fieldset>

		<fieldset class="quick">
			{S_HIDDEN_FIELDS}
			{S_FORM_TOKEN}
			<input class="button1" type="submit" name="next" value="{L_PROFILE_TYPE_OPTIONS}" />
		</fieldset>

	<!-- ELSEIF S_STEP_TWO -->

		<fieldset>
			<legend>{L_TITLE}</legend>
		<!-- BEGIN option -->
			<dl>
				<dt><label>{option.TITLE}:</label><!-- IF option.EXPLAIN --><br /><span>{option.EXPLAIN}</span><!-- ENDIF --></dt>
				<dd>{option.FIELD}</dd>
			</dl>
		<!-- END option -->
		</fieldset>

		<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
			<input class="button1" type="submit" name="prev" value="{L_PROFILE_BASIC_OPTIONS}" />
		</fieldset>

		<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
			{S_HIDDEN_FIELDS}
			{S_FORM_TOKEN}
			<input class="button1" type="submit" name="next" value="{L_NEXT_STEP}" />
		</fieldset>

	<!-- ELSEIF S_STEP_THREE -->

		<!-- BEGIN options -->
			<fieldset>
				<legend>{options.LANGUAGE}</legend>
			<!-- BEGIN field -->
				<dl>
					<dt><label>{options.field.L_TITLE}:</label><!-- IF options.field.L_EXPLAIN --><br /><span>{options.field.L_EXPLAIN}</span><!-- ENDIF --></dt>
					{options.field.FIELD}
				</dl>
			<!-- END field -->
			</fieldset>
		<!-- END options -->

		<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
			<input class="button1" type="submit" name="prev" value="{L_PROFILE_TYPE_OPTIONS}" />
		</fieldset>

		<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
			{S_HIDDEN_FIELDS}
			<input class="button1" type="submit" name="save" value="{L_SAVE}" />
			{S_FORM_TOKEN}
		</fieldset>

	<!-- ENDIF -->

	</form>

<!-- ELSE -->

	<h1>{L_ACP_CUSTOM_PROFILE_FIELDS}</h1>

	<!-- IF S_NEED_EDIT -->
		<div class="errorbox">
			<h3>{L_WARNING}</h3>
			<p>{L_CUSTOM_FIELDS_NOT_TRANSLATED}</p>
		</div>
	<!-- ENDIF -->

	<table cellspacing="1">
	<thead>
	<tr>
		<th>{L_FIELD_IDENT}</th>
		<th>{L_FIELD_TYPE}</th>
		<th colspan="2">{L_OPTIONS}</th>
	</tr>
	</thead>
	<tbody>
	<!-- BEGIN fields -->
		<!-- IF fields.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

		<td>{fields.FIELD_IDENT}</td>
		<td>{fields.FIELD_TYPE}</td>
		<td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>

		<td style="width: 80px; text-align: right; white-space: nowrap;">
			<!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
				{ICON_MOVE_UP_DISABLED}
				<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
			<!-- ELSEIF not fields.S_FIRST_ROW && not fields.S_LAST_ROW-->
				<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
				<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
			<!-- ELSEIF fields.S_LAST_ROW && not fields.S_FIRST_ROW -->
				<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
				{ICON_MOVE_DOWN_DISABLED}
			<!-- ENDIF -->
			<!-- IF not fields.S_NEED_EDIT -->
				<a href="{fields.U_EDIT}">{ICON_EDIT}</a>
			<!-- ELSE -->
				{ICON_EDIT_DISABLED}
			<!-- ENDIF -->
			<a href="{fields.U_DELETE}">{ICON_DELETE}</a>
		</td>

	</tr>
	<!-- BEGINELSE -->
	<tr class="row3">
		<td colspan="4">{L_ACP_NO_ITEMS}</td>
	</tr>
	<!-- END fields -->
	</tbody>
	</table>

	<form id="profile_fields" method="post" action="{U_ACTION}">

	<fieldset class="quick">
		<input class="text small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select>
		<input class="button1" type="submit" name="submit" value="{L_CREATE_NEW_FIELD}" />
		<input type="hidden" name="create" value="1" />
		{S_FORM_TOKEN}
	</fieldset>
	</form>

<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->
